<!DOCTYPE html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">



  
  
    
    
  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/lib/pace/pace-theme-center-minimal.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.3" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="32x32" href="http://7xqdz8.com1.z0.glb.clouddn.com/avatar.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="16x16" href="http://7xqdz8.com1.z0.glb.clouddn.com/avatar.png?v=5.1.3">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.3" color="#222">





  <meta name="keywords" content="Android,Java," />










<meta name="description" content="集合
对 HashMap 进行排序:  HashMap 本身无序，但其子类 LinkedHashMap 使用链表结构，实现了有序。通过 HashMap#entrySet() 方法可以将 Map 转为 Set&amp;lt;Entry&amp;gt; ，再在 ArrayList 的构造函数中可以传入 Collections ，正好 Set 和 List 的父类就是 Collections ，这样就可以调用 Coll">
<meta property="og:type" content="article">
<meta property="og:title" content="Android 相关重难点知识整理">
<meta property="og:url" content="/2016/12/15/AndroidKnowledge/index.html">
<meta property="og:site_name" content="一路前行">
<meta property="og:description" content="集合
对 HashMap 进行排序:  HashMap 本身无序，但其子类 LinkedHashMap 使用链表结构，实现了有序。通过 HashMap#entrySet() 方法可以将 Map 转为 Set&amp;lt;Entry&amp;gt; ，再在 ArrayList 的构造函数中可以传入 Collections ，正好 Set 和 List 的父类就是 Collections ，这样就可以调用 Coll">
<meta property="og:updated_time" content="2016-12-26T14:18:43.451Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Android 相关重难点知识整理">
<meta name="twitter:description" content="集合
对 HashMap 进行排序:  HashMap 本身无序，但其子类 LinkedHashMap 使用链表结构，实现了有序。通过 HashMap#entrySet() 方法可以将 Map 转为 Set&amp;lt;Entry&amp;gt; ，再在 ArrayList 的构造函数中可以传入 Collections ，正好 Set 和 List 的父类就是 Collections ，这样就可以调用 Coll">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '5.1.3',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="/2016/12/15/AndroidKnowledge/"/>





  <title>Android 相关重难点知识整理 | 一路前行</title>
  





  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?8193f7e44c62cdda245d5f109196c830";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">一路前行</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">Always believe that some thing wonderful is about to happen.</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="/2016/12/15/AndroidKnowledge/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Voyager">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="http://7xqdz8.com1.z0.glb.clouddn.com/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="一路前行">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Android 相关重难点知识整理</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2016-12-15T22:00:00+08:00">
                2016-12-15
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Android/" itemprop="url" rel="index">
                    <span itemprop="name">Android</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="u96C6_u5408"><a href="#u96C6_u5408" class="headerlink" title="集合"></a>集合</h1><ol>
<li>对 <code>HashMap</code> 进行排序:  <code>HashMap</code> 本身无序，但其子类 <code>LinkedHashMap</code> 使用链表结构，实现了有序。通过 <code>HashMap#entrySet()</code> 方法可以将 <code>Map</code> 转为 <code>Set&lt;Entry&gt;</code> ，再在 <code>ArrayList</code> 的构造函数中可以传入 <code>Collections</code> ，正好 <code>Set</code> 和 <code>List</code> 的父类就是 <code>Collections</code> ，这样就可以调用 <code>Collections.sort(list, comparator)</code> 进行排序了。排序好后，使用 <code>for</code> 遍历加入 <code>LinkedHashMap</code> 。</li>
</ol>
<a id="more"></a>
<h1 id="u5F15_u7528_u7C7B_u578B"><a href="#u5F15_u7528_u7C7B_u578B" class="headerlink" title="引用类型"></a>引用类型</h1><ol>
<li><p>引用类型</p>
<ul>
<li><p>强引用</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">String str = &#34;abc&#34;;</span><br></pre></td></tr></table></figure>
</li>
<li><p>软引用</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">SoftReference&#60;String&#62; soft = new SoftReference&#60;String&#62;(str);</span><br></pre></td></tr></table></figure>
</li>
<li><p>弱引用</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">WeakReference&#60;String&#62; wek = new WeakReference&#60;String&#62;(str);</span><br></pre></td></tr></table></figure>
</li>
<li><p>虚引用</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">PhantomReference</span><br></pre></td></tr></table></figure>
</li>
</ul>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 注意</span></span><br><span class="line">String str = <span class="string">"abc"</span>; <span class="comment">// 常量池中</span></span><br><span class="line">String str = <span class="keyword">new</span> String(<span class="string">"abc"</span>); <span class="comment">// 堆内存中</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>对象可及性<br>强可及对象: 除非虚拟机 <code>OOM</code> ，否则永远不会被回收<br>软可及对象: 系统内存不足时，被回收<br>弱可及对象: 当系统 <code>GC</code> 发现发现该对象，就被回收</p>
</li>
</ol>
<h1 id="u7EBF_u7A0B_u6C60"><a href="#u7EBF_u7A0B_u6C60" class="headerlink" title="线程池"></a>线程池</h1><ol>
<li><p>控制一个方法的并发数量限制</p>
<ul>
<li><p>方法一，使用信号量<br><code>Semaphore</code> 信号量，构造函数传入允许个数。<br><code>Semaphore#acquire()</code> 取得锁， <code>Semaphore#release()</code> 释放锁。</p>
</li>
<li><p>方法二，使用线程池</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Excutors.newFixedThreadPool(num);</span><br></pre></td></tr></table></figure>
</li>
</ul>
</li>
<li><p>手动实现线程池</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">new</span> ThreadPoolExecutor(</span><br><span class="line">        <span class="keyword">int</span> corePoolSize, <span class="comment">// 核心池大小: 建议 CPU 个数+1</span></span><br><span class="line">        <span class="keyword">int</span> maximumPoolSize, <span class="comment">// 线程池最大容量</span></span><br><span class="line">        <span class="keyword">long</span> keepAliveTime, <span class="comment">// 任务执行完毕后释放延时</span></span><br><span class="line">        TimeUnit unit, <span class="comment">// 时间的单位</span></span><br><span class="line">        BlockingQueue&lt;Runnable&gt; workQueue, <span class="comment">// 工作队列</span></span><br><span class="line">        ThreadFactory threadFactory, <span class="comment">// 将 Runnable 包装成线程的工厂</span></span><br><span class="line">        RejectedExecutionHandler handler)</span><br></pre></td></tr></table></figure>
<ul>
<li>线程数总大小为 最大池大小(Thread)+队列(Runnable)</li>
<li>接口 <code>BlockingQueue</code> 是单端队列， <code>BlockingDueue</code> 是双端队列。对于单端队列，其子类有 <code>Array</code> 和 <code>Linked</code> 等，对于此处频繁增删的需求，使用 <code>LinkedBlockingQueue</code> 更佳。</li>
<li>对于 <code>i++</code> ，要使用线程安全的 <code>AtomInteger#getAndIncrement()</code> 方法</li>
</ul>
</li>
</ol>
<h1 id="IOC__28DI_29"><a href="#IOC__28DI_29" class="headerlink" title="IOC (DI)"></a>IOC (DI)</h1><ol>
<li>IOC(DI) 概念<br>Inverse Of Controller，控制反转; Dependency Inject 依赖注入。</li>
<li>ViewUtils框架，XUtils中的四大部分之一，使用到就是 IOC</li>
<li>自定义注解<ul>
<li>Target，注解类作用的对象，如FILED、METHOD等</li>
<li>Retention，生命周期，SOURCE(源码中存在，编译成字节码被清除)、CLASS(字节码中存在，运行时被清除)、RUNTIME(运行期运行期有效，会被加载到虚拟机中)</li>
<li>定义体中， <code>value</code> 作为默认变量名，如 <code>@XXX(&quot;abc&quot;)</code></li>
</ul>
</li>
<li>反射<ul>
<li><code>getFiled()</code> 只能获取 <code>public</code> 修饰的字段，通常使用 <code>getDeclaredFileld()</code> 获取申明的字段</li>
<li>设置字段的值先通过 <code>DeclaredFiled#setAccessible(true)</code> 暴力取得权限，再通过 <code>DeclaredField#set(user, name)</code> 设置</li>
</ul>
</li>
</ol>
<h1 id="Handler__u673A_u5236"><a href="#Handler__u673A_u5236" class="headerlink" title="Handler 机制"></a>Handler 机制</h1><ol>
<li><code>Handler</code> 通常用于子线程给主线程发送消息</li>
<li><code>Looper.prepare()</code>，创建 <code>Looper</code> ，创建 <code>MessageQueue</code> ，通过 <code>ThreadLocal</code> 将 <code>Looper</code> 与主线程绑定</li>
<li><code>new Handler()</code>，从 <code>ThreadLocal</code> 中取得 <code>Looper</code>，从 <code>Looper</code> 中取得 <code>MessageQueue</code> 的引用</li>
<li><code>handler#sendMeessage()</code>，消息中添加 <code>msg.target=this</code>，然后放入 <code>MessageQueue</code> </li>
<li><code>Looper#loop()</code>，循环取消息池，调用 <code>dispatchMessage()</code> </li>
<li><code>Looper</code> 需要调用 <code>Looper#quit()</code> 终止</li>
</ol>
<h1 id="Fragment"><a href="#Fragment" class="headerlink" title="Fragment"></a>Fragment</h1><ol>
<li><code>Fragment</code> 切换使用 <code>Fragment#hide()</code> 和 <code>Fragment#show()</code> 效率最高</li>
<li>手动实现回退栈</li>
</ol>
<ul>
<li><p>每次替换 <code>Fragment</code> 的时候添加到 <code>List</code> </p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span>(list.contains(fragment))&#123;</span><br><span class="line">   list.remove(fragment);</span><br><span class="line">   list.add(fragment);</span><br><span class="line">&#125;<span class="keyword">else</span> &#123;</span><br><span class="line">   list.add(fragment);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li>监听返回按钮<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span>(list.size() &gt; <span class="number">1</span>)&#123;</span><br><span class="line">        list.remove(list.size()-<span class="number">1</span>);</span><br><span class="line">        transcation</span><br><span class="line">            .hide(...)</span><br><span class="line">            .show(list.get(list.size()-<span class="number">1</span>))</span><br><span class="line">            .commit();</span><br><span class="line">&#125;<span class="keyword">else</span> &#123;</span><br><span class="line">        finish();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ul>
</li>
</ul>
<h1 id="u56FE_u7247_u5904_u7406"><a href="#u56FE_u7247_u5904_u7406" class="headerlink" title="图片处理"></a>图片处理</h1><ul>
<li>ImageLoader<br>年限久，用户量大</li>
<li>Glide<br>官方推荐使用，功能强大</li>
<li>Picasso<br>热门，受欢迎</li>
<li>Fresco<br>三级缓存，不能使用原生的控件</li>
</ul>
<h1 id="u5E8F_u5217_u5316"><a href="#u5E8F_u5217_u5316" class="headerlink" title="序列化"></a>序列化</h1><ol>
<li><code>Serializable</code> 是 <code>Java SE</code> 实现的用于对象序列化的接口， <code>Parcelable</code> 是 <code>Android</code> 推出的用于序列化的接口。 <code>Serializable</code> 实现更简单，但性能不如 <code>Parcelable</code> </li>
<li><code>transient</code> 关键字用于保留字段不被序列化</li>
</ol>
<h1 id="Activity__u4FDD_u5B58"><a href="#Activity__u4FDD_u5B58" class="headerlink" title="Activity 保存"></a>Activity 保存</h1><ol>
<li><code>onSaveInstanceState()</code> 是会在 <code>onStop()</code> 前调用，用于保存 <code>Activity</code> 的状态</li>
<li>调用时机: 横竖屏切换、HOME键后台等，但按返回键将不会调用</li>
</ol>
<h1 id="u81EA_u5B9A_u4E49_u6743_u9650"><a href="#u81EA_u5B9A_u4E49_u6743_u9650" class="headerlink" title="自定义权限"></a>自定义权限</h1><ol>
<li>在清单文件中 <code>Activity</code> 可设置属性 <code>permission</code> 来自定义启用该活动所需要的权限，可以任意命名</li>
<li><p>自定义权限在使用的时候要先声明再使用:</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">// 声明权限</span><br><span class="line"><span class="tag">&lt;<span class="title">permission</span> <span class="attribute">android:name</span>=<span class="value">"com.xxx.xxx.AAA"</span> /&gt;</span></span><br><span class="line">// 使用权限</span><br><span class="line"><span class="tag">&lt;<span class="title">use-permission</span> <span class="attribute">android:name</span>=<span class="value">"com.xxx.xxx.AAA"</span> /&gt;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>四大组件都是可以声明自定义权限的</p>
</li>
<li>在广播接收者中，调用 <code>sendBroadcast(intent, String permission)</code> 指定权限，但仍然需要在清单文件中申明与使用，广播的自定义权限主要用于友方相互唤醒</li>
</ol>
<h1 id="Service"><a href="#Service" class="headerlink" title="Service"></a>Service</h1><ol>
<li><code>startService()</code> 方式启动，<code>Service</code> 就一直在后台运行，与其他组件的生命周期无关，<code>bindService()</code> 方式启动，<code>Activity</code> 销毁时该 <code>Service</code> 也同时销毁</li>
<li><code>IntentService</code> 用于执行较耗时的后台任务，执行完成后自动销毁</li>
</ol>
<h1 id="7-0__u65B0_u7279_u6027"><a href="#7-0__u65B0_u7279_u6027" class="headerlink" title="7.0 新特性"></a>7.0 新特性</h1><ol>
<li><code>JIT</code> 编译器: 安装速度提升 <code>75%</code>，并减少 <code>50%</code> 的应用程序编译代码，并在同等 <code>CPU</code> 性能从 <code>30%</code> 提高到 <code>600%</code>，使用 <code>JIT</code> 可以让用户安装程序、运行应用更快。</li>
<li><code>Vulkan API</code>: <code>Open GL</code> 的下一个版本，<code>Android 7.0</code> 将支持相关 <code>API</code></li>
<li>多窗口模式: 可以分屏开多个多窗口</li>
<li>可回复通知: 通过 <code>Notifiction.builder</code> 中 <code>addAction()</code> 可以设置回复</li>
<li>目录访问权限: 使用 <code>StorageManager</code> 访问目录，，，它将动态申请权限，而不需要在清单文件中申明权限</li>
<li>流量节省程序: 系统增加了一个全局的流量节省工具</li>
<li><code>ICU4J API</code> 支持: 系统内置了该免费开源 <code>Unicode</code> 工具库，不需要再在应用中集成</li>
<li><code>Direct Boot</code>: 新的系统中应用可以申请在开机未解锁的情况下直接启动，比如微信、第三方的闹钟等</li>
<li><code>VR</code> 使用: 支持 <code>VR</code> 应用程序编写，使用 <code>com.google.vr.sdk.widgets.pano.VrPanoramaView</code> 控件和 <code>com.google.vr.sdk.widgets.pano.VrVideView</code> 分别显示图片和视频</li>
</ol>

      
    </div>
    
    
    

    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div></div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="http://7xqdz8.com1.z0.glb.clouddn.com/pay_weixin.png" alt="Voyager 微信支付"/>
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="http://7xqdz8.com1.z0.glb.clouddn.com/pay_alipay.jpg" alt="Voyager 支付宝"/>
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Android/" rel="tag"># Android</a>
          
            <a href="/tags/Java/" rel="tag"># Java</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/09/03/JavaConcurrency1/" rel="next" title="Java并发编程(一)">
                <i class="fa fa-chevron-left"></i> Java并发编程(一)
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/12/26/Linux_process/" rel="prev" title="初探 Linux 系统编程之进程">
                初探 Linux 系统编程之进程 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="http://7xqdz8.com1.z0.glb.clouddn.com/avatar.png"
                alt="Voyager" />
            
              <p class="site-author-name" itemprop="name">Voyager</p>
              <p class="site-description motion-element" itemprop="description">Android Developer</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">41</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">8</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                
                  <span class="site-state-item-count">10</span>
                  <span class="site-state-item-name">标签</span>
                
              </div>
            

          </nav>

          

          <div class="links-of-author motion-element">
            
              
                <span class="links-of-author-item">
                  <a href="https://github.com/a-voyager" target="_blank" title="GitHub">
                    
                      <i class="fa fa-fw fa-github"></i>GitHub</a>
                </span>
              
                <span class="links-of-author-item">
                  <a href="mailto:w19961009@126.com" target="_blank" title="E-Mail">
                    
                      <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                </span>
              
                <span class="links-of-author-item">
                  <a href="https://weibo.com/u/2306071720" target="_blank" title="微博">
                    
                      <i class="fa fa-fw fa-weibo"></i>微博</a>
                </span>
              
            
          </div>

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#u96C6_u5408"><span class="nav-number">1.</span> <span class="nav-text">集合</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#u5F15_u7528_u7C7B_u578B"><span class="nav-number">2.</span> <span class="nav-text">引用类型</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#u7EBF_u7A0B_u6C60"><span class="nav-number">3.</span> <span class="nav-text">线程池</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#IOC__28DI_29"><span class="nav-number">4.</span> <span class="nav-text">IOC (DI)</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Handler__u673A_u5236"><span class="nav-number">5.</span> <span class="nav-text">Handler 机制</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Fragment"><span class="nav-number">6.</span> <span class="nav-text">Fragment</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#u56FE_u7247_u5904_u7406"><span class="nav-number">7.</span> <span class="nav-text">图片处理</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#u5E8F_u5217_u5316"><span class="nav-number">8.</span> <span class="nav-text">序列化</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Activity__u4FDD_u5B58"><span class="nav-number">9.</span> <span class="nav-text">Activity 保存</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#u81EA_u5B9A_u4E49_u6743_u9650"><span class="nav-number">10.</span> <span class="nav-text">自定义权限</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Service"><span class="nav-number">11.</span> <span class="nav-text">Service</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#7-0__u65B0_u7279_u6027"><span class="nav-number">12.</span> <span class="nav-text">7.0 新特性</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2015 &mdash; <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">WuHaojie</span>

  
</div>









        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

  
  <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.3"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.3"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.3"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.3"></script>



  


  




	





  





  








  





  

  

  

  

  

  

</body>
</html>
